#include "cnnewdialog.h"

cnNewDialog::cnNewDialog(QWidget *parent)// :
    //QDialog(parent)
{
    if (this->objectName().isEmpty())
        this->setObjectName(QString::fromUtf8("this"));
    this->resize(400, 170);
    cnNewOk = new QPushButton(this);
    cnNewOk->setObjectName(QString::fromUtf8("cnNewOk"));
    cnNewOk->setGeometry(QRect(320, 140, 75, 23));
    cnNewCancle = new QPushButton(this);
    cnNewCancle->setObjectName(QString::fromUtf8("cnNewCancle"));
    cnNewCancle->setGeometry(QRect(240, 140, 75, 23));
    QSizePolicy sizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
    sizePolicy.setHorizontalStretch(0);
    sizePolicy.setVerticalStretch(0);
    sizePolicy.setHeightForWidth(cnNewCancle->sizePolicy().hasHeightForWidth());
    cnNewCancle->setSizePolicy(sizePolicy);
    cnNewLine = new QFrame(this);
    cnNewLine->setObjectName(QString::fromUtf8("cnNewLine"));
    cnNewLine->setGeometry(QRect(0, 120, 401, 16));
    cnNewLine->setFrameShape(QFrame::HLine);
    cnNewLine->setFrameShadow(QFrame::Sunken);
    cnNewLabel1 = new QLabel(this);
    cnNewLabel1->setObjectName(QString::fromUtf8("cnNewLabel1"));
    cnNewLabel1->setGeometry(QRect(15, 15, 211, 20));
    QFont font;
    font.setPointSize(12);
    cnNewLabel1->setFont(font);
    cnNewSize = new QSpinBox(this);
    cnNewSize->setObjectName(QString::fromUtf8("cnNewSize"));
    cnNewSize->setGeometry(QRect(230, 15, 160, 20));
    cnNewSize->setMinimum(36);
    cnNewSize->setMaximum(600);
    cnNewSize->setSingleStep(6);
    cnNewLabel2 = new QLabel(this);
    cnNewLabel2->setObjectName(QString::fromUtf8("cnNewLabel2"));
    cnNewLabel2->setGeometry(QRect(15, 40, 211, 20));
    cnNewLabel2->setFont(font);
    cnNewName = new QLineEdit(this);
    cnNewName->setObjectName(QString::fromUtf8("cnNewName"));
    cnNewName->setGeometry(QRect(230, 40, 160, 20));
    cnNewName->setMaxLength(32);
    cnNewLabel3 = new QLabel(this);
    cnNewLabel3->setObjectName(QString::fromUtf8("cnNewLabel3"));
    cnNewLabel3->setGeometry(QRect(15, 65, 211, 20));
    cnNewLabel3->setFont(font);
    cnNewCount = new QSpinBox(this);
    cnNewCount->setObjectName(QString::fromUtf8("cnNewCount"));
    cnNewCount->setGeometry(QRect(230, 65, 160, 20));
    cnNewCount->setMinimum(2);
    cnNewCount->setMaximum(4);
    cnNewLabel4 = new QLabel(this);
    cnNewLabel4->setObjectName(QString::fromUtf8("cnNewLabel4"));
    cnNewLabel4->setGeometry(QRect(15, 90, 211, 20));
    cnNewLabel4->setFont(font);
    cnNewColor = new QComboBox(this);
    cnNewColor->setObjectName(QString::fromUtf8("cnNewColor"));
    cnNewColor->setGeometry(QRect(230, 90, 160, 20));

    this->setWindowTitle(QApplication::translate("this", "New Local Game", 0, QApplication::UnicodeUTF8));
    cnNewOk->setText(QApplication::translate("this", "Ok", 0, QApplication::UnicodeUTF8));
    cnNewCancle->setText(QApplication::translate("this", "Cancle", 0, QApplication::UnicodeUTF8));
    cnNewLabel1->setText(QApplication::translate("this", "Field Size:", 0, QApplication::UnicodeUTF8));
    cnNewLabel2->setText(QApplication::translate("this", "Player Name:", 0, QApplication::UnicodeUTF8));
    cnNewName->setText(QApplication::translate("this", "Default Player", 0, QApplication::UnicodeUTF8));
    cnNewLabel3->setText(QApplication::translate("this", "Players Count:", 0, QApplication::UnicodeUTF8));
    cnNewLabel4->setText(QApplication::translate("this", "Player Color:", 0, QApplication::UnicodeUTF8));
    cnNewColor->clear();
    cnNewColor->insertItems(0, QStringList()
     << QApplication::translate("this", "Blue", 0, QApplication::UnicodeUTF8)
     << QApplication::translate("this", "Red", 0, QApplication::UnicodeUTF8)
     << QApplication::translate("this", "Green", 0, QApplication::UnicodeUTF8)
     << QApplication::translate("this", "Purple", 0, QApplication::UnicodeUTF8)
    );

    QObject::connect(cnNewCancle,SIGNAL(clicked()),this,SLOT(close()));
    QObject::connect(cnNewCancle,SIGNAL(clicked(bool)),parent,SLOT(setDisabled(bool)));
    QObject::connect(cnNewOk,SIGNAL(clicked()),this,SLOT(close()));
    QObject::connect(cnNewOk,SIGNAL(clicked(bool)),parent,SLOT(setDisabled(bool)));

    QMetaObject::connectSlotsByName(this);
}
